home *** CD-ROM | disk | FTP | other *** search
/ Software Vault: The Gold Collection / Software Vault - The Gold Collection (American Databankers) (1993).ISO / cdr50 / pbc22b.zip / PBC$BAS.ZIP / MSHUFFLD.BAS < prev    next >
BASIC Source File  |  1993-04-19  |  649b  |  15 lines

  1. '   +----------------------------------------------------------------------+
  2. '   |                                                                      |
  3. '   |        PBClone  Copyright (c) 1990-1993  Thomas G. Hanlin III        |
  4. '   |                                                                      |
  5. '   +----------------------------------------------------------------------+
  6.  
  7. DECLARE FUNCTION RndI% (TopValue%)
  8.  
  9. SUB MatShuffleD (Array() AS DOUBLE, StartPosn%, EndPosn%)
  10.    Elements% = EndPosn% - StartPosn% + 1
  11.    FOR tmp% = StartPosn% TO EndPosn%
  12.       SWAP Array(tmp%), Array(RndI%(Elements%) + StartPosn%)
  13.    NEXT
  14. END SUB
  15.